<!DOCTYPE html>
<html xmlns:th="http://www.thymeleaf.org">
<head lang="en">
    <meta charset="utf-8"/>
    <title>个人信息</title>
    <link rel="stylesheet" type="text/css" href="css/public.css"/>
    <link rel="stylesheet" type="text/css" href="css/mygrxx.css"/>
</head>
<body>
<div class="head ding">
    <div  th:replace="common :: head" ></div>

</div>

<div class="address mt">
    <div class="wrapper clearfix"><a href="index.html" class="fl">首页</a><span>/</span><a href="mygxin.html" class="on">个人信息</a>
    </div>
</div><!------------------------------Bott------------------------------>
<div class="Bott">
    <div class="wrapper clearfix">
        <div  th:replace="common :: zuoFl"></div>
        <div class="you fl"><h2>个人信息</h2>
            <div class="gxin">
                <div class="tx" style="margin-top: 20px"><a href="#"><img th:src="${session.portalUser.header_url}" width="100" height="100"/>
                    <p id="avatar">修改头像</p></a></div>
                <div class="xx"><h3 class="clearfix"><strong class="fl">基础资料</strong><a href="#" class="fr" id="edit1">编辑</a>
                </h3>
                    <div th:text="${'用户名：'+session.portalUser.username}"></div>
                    <div th:text="${'电话：'+session.portalUser.phone}"></div>
                    <div th:text="${'性别：'+session.portalUser.sex}"></div>
                </div>
            </div>
        </div>
    </div>
</div><!--遮罩-->
<div class="mask"></div><!--编辑弹框-->
<div class="bj">
    <div class="clearfix"><a href="#" class="fr gb"><img src="img/icon4.png"/></a></div>
    <h3>编辑基础资料</h3>
    <form th:action="@{'/user/update?id='+${session.portalUser.id}}" method="post"><p><label>用户名：</label><input type="text" name="username" th:value="${session.portalUser.username}"/></p>
        <p><label >电话：</label><input type="text" name="phone" th:value="${session.portalUser.phone}"/></p>
        <p><label>性别：</label>
            <span th:if="${session.portalUser.sex=='男'}"><input type="radio" name="sex" value="男" checked/>男</span>
            <span th:if="${session.portalUser.sex!='男'}"><input type="radio" name="sex" value="男" />男</span>
            <span th:if="${session.portalUser.sex=='女'}"><input type="radio" value="女" name="sex" checked/>女</span>
            <span th:if="${session.portalUser.sex!='女'}"><input type="radio" value="女" name="sex" />女</span>
        </p>
        <div class="bc"><input type="submit" value="保存"/><input type="button" value="取消"/></div>
    </form>
</div><!--修改头像-->
<div class="avatar" >
    <div class="clearfix"><a href="#" class="fr gb"></a></div>
    <h3>修改头像</h3>
    <form th:action="@{'/user/upload?id='+${session.portalUser.id}}" method="post" enctype="multipart/form-data"><h4>请上传图片</h4><input onclick="upload()" type="button" value="上传头像"/>
        <input type="file" hidden="hidden" name="header_url" id="file" />
        <p>jpg或png，大小不超过100kb</p><input style="margin-left: 140px;font-size: 20px;border: 1px solid red;background-color: red;color: white" type="submit" value="提交"/></form>
</div><!--返回顶部-->
<div th:replace="common :: gotop"></div>

<div  th:replace="common :: footer"></div>
<script src="js/jquery-1.12.4.min.js" type="text/javascript" charset="utf-8"></script>
<script src="js/public.js" type="text/javascript" charset="utf-8"></script>
<script src="js/user.js" type="text/javascript" charset="utf-8"></script>
<script>
    function upload() {
        document.getElementById("file").click();
    }
</script>
</body>
</html>